import request from '@/utils/request'

export const ScanCode = ({ code, allPart = true }) => {
  return request({
    url: '/ScanCode',
    method: 'post',
    params: {
      code, allPart
    }
  })
}

export const CreateRework = (data) => {
  return request({
    url: '/CreateRework',
    method: 'post',
    data
  })
}

export const GetList = (data) => {
  return request({
    url: '/GetList',
    method: 'post',
    data
  })
}

export const ProcessRework = (data) => {
  return request({
    url: '/ProcessRework',
    method: 'post',
    data
  })
}

export const GetReworkDetail = (params) => {
  return request({
    url: '/GetReworkDetail',
    method: 'post',
    params
  })
}
